package com.itany.pojo;


import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * 书籍
 */
public class Book implements Serializable {
    /**
     * 图书id
     */
    private Integer id;
    /**
     * 图书名称
     */
    private String bookname;
    /**
     * 图书作者
     */
    private String author;
    /**
     * 出版日期
     */
    @JSONField(format = "yyyy-MM-dd")
    private Date publishdate;
    /**
     * 团购价格
     */
    private BigDecimal groupprice;
    /**
     * 零售价格
     */
    private BigDecimal price;
    /**
     * 开本
     */
    private String format;
    /**
     * 页数
     */
    private String pagenumber;
    /**
     * ISBN号
     */
    private String ISBN;
    /**
     * 条形码
     */
    private String barcode;
    /**
     * 版次
     */
    private Integer layout;
    /**
     * 印刷次数
     */
    private Integer printingnumber;
    /**
     * 册数
     */
    private String register;
    /**
     * 重量
     */
    private String weight;
    /**
     * 书籍简介
     */
    private String bookintroduce;
    /**
     * 作者简介
     */
    private String authorintroduce;
    /**
     * 目录
     */
    private String catalog;
    /**
     * 图书类型
     */
    private BookType booktype;
    /**
     * 入库事件
     */
    private Date createtime;
    /**
     * 出版社
     */
    private Press press;
    /**
     * 库存数量
     */
    private Integer number;
    /**
     * 封面图片
     */
    private String imgurl;
    /**
     * 是否启用
     */
    private Integer flag;
    /**
     * 推荐类型
     */
    private Integer recommend;

    /**
     * 书籍供应商
     */
    private List<Supplier> suppliers;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getBookname() {
        return bookname;
    }

    public void setBookname(String bookname) {
        this.bookname = bookname;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getPublishdate() {
        return publishdate;
    }

    public void setPublishdate(Date publishdate) {
        this.publishdate = publishdate;
    }

    public BigDecimal getGroupprice() {
        return groupprice;
    }

    public void setGroupprice(Double groupprice) {
        this.groupprice = BigDecimal.valueOf(groupprice);
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price =BigDecimal.valueOf(price);
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public String getPagenumber() {
        return pagenumber;
    }

    public void setPagenumber(String pagenumber) {
        this.pagenumber = pagenumber;
    }

    public String getISBN() {
        return ISBN;
    }

    public void setISBN(String ISBN) {
        this.ISBN = ISBN;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public Integer getLayout() {
        return layout;
    }

    public void setLayout(Integer layout) {
        this.layout = layout;
    }

    public Integer getPrintingnumber() {
        return printingnumber;
    }

    public void setPrintingnumber(Integer printingnumber) {
        this.printingnumber = printingnumber;
    }

    public String getRegister() {
        return register;
    }

    public void setRegister(String register) {
        this.register = register;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getBookintroduce() {
        return bookintroduce;
    }

    public void setBookintroduce(String bookintroduce) {
        this.bookintroduce = bookintroduce;
    }

    public String getAuthorintroduce() {
        return authorintroduce;
    }

    public void setAuthorintroduce(String authorintroduce) {
        this.authorintroduce = authorintroduce;
    }

    public String getCatalog() {
        return catalog;
    }

    public void setCatalog(String catalog) {
        this.catalog = catalog;
    }

    public BookType getBooktype() {
        return booktype;
    }

    public void setBooktype(BookType booktype) {
        this.booktype = booktype;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Press getPress() {
        return press;
    }

    public void setPress(Press press) {
        this.press = press;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getImgurl() {
        return imgurl;
    }

    public void setImgurl(String imgurl) {
        this.imgurl = imgurl;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public Integer getRecommend() {
        return recommend;
    }

    public void setRecommend(Integer recommend) {
        this.recommend = recommend;
    }

    public List<Supplier> getSuppliers() {
        return suppliers;
    }

    public void setSuppliers(List<Supplier> suppliers) {
        this.suppliers = suppliers;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", bookname='" + bookname + '\'' +
                ", author='" + author + '\'' +
                ", publishdate=" + publishdate +
                ", groupprice=" + groupprice +
                ", price=" + price +
                ", format='" + format + '\'' +
                ", pagenumber='" + pagenumber + '\'' +
                ", ISBN='" + ISBN + '\'' +
                ", barcode='" + barcode + '\'' +
                ", layout=" + layout +
                ", printingnumber=" + printingnumber +
                ", register='" + register + '\'' +
                ", weight='" + weight + '\'' +
                ", bookintroduce='" + bookintroduce + '\'' +
                ", authorintrodue='" + authorintroduce + '\'' +
                ", catalog='" + catalog + '\'' +
                ", booktype=" + booktype +
                ", ceratetime=" + createtime +
                ", press=" + press +
                ", number=" + number +
                ", imgurl='" + imgurl + '\'' +
                ", flag=" + flag +
                ", recommend=" + recommend +
                ", suppliers=" + suppliers +
                '}';
    }
}
